﻿//-----------------------------------------------------------------------------------------
// <copyright file="User.cs" company="Jakub Florczyk (www.jakubflorczyk.pl)">
//      Copyright © 2009 Jakub Florczyk (www.jakubflorczyk.pl)
//      http://flakernet.codeplex.com
// </copyright>
//-----------------------------------------------------------------------------------------

namespace FlakerNET
{
    using System;
    using FlakerNET.Converters;
    using Newtonsoft.Json;

    /// <summary>
    /// Płeć użytkownika.
    /// </summary>
    public enum Sex
    {
        /// <summary>
        /// Kobieta.
        /// </summary>
        Female,

        /// <summary>
        /// Mężczyzna.
        /// </summary>
        Male,        

        /// <summary>
        /// Niezdefiniowana.
        /// </summary>
        Undefined
    }

    /// <summary>
    /// Definicja użytkownika.
    /// </summary>
    public class User
    {
        /// <summary>
        /// Login użytkownika.
        /// </summary>
        [JsonProperty("login")]
        public string Login { get; set; }

        /// <summary>
        /// Adres awatara.
        /// </summary>
        [JsonProperty("avatar")]
        [JsonConverter(typeof(UriConverter))]
        public Uri Avatar { get; set; }

        /// <summary>
        /// Adres przyjaciela.
        /// </summary>
        [JsonProperty("url")]
        [JsonConverter(typeof(UriConverter))]
        public Uri Url { get; set; }

        /// <summary>
        /// Płeć użytkownika.
        /// </summary>
        [JsonProperty("sex")]
        [JsonConverter(typeof(SexConverter))]
        public Sex Sex { get; set; }

        /// <summary>
        /// Opis zdarzenia.
        /// </summary>
        [JsonProperty("action")]
        public string Action { get; set; }
    }
}
